home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-20 | 2.8 KB | 68 lines | [TEXT/GEOL] |
- Item forwarded by BOWMAN to TRAMMEL1
-
- Item 0148626 18-Oct-89 12:01
-
- From: A33 Drexel U, Nadine Perkey, ASC,PRA
-
- To: MACAPP.TECH$ MACAPP Tech
-
- cc: D2458 Tactics Int'l, David Shillito,PRT
-
- Sub: Printing in MacApp 2.0B9
-
-
- David,
-
- I am also working on an application that requires hi res printing. I solved
- the problem a while back by overriding TStdPrintHandler (ignoring the tech
- notes and the FracApp300 description). The basic idea was to increase the
- printer resolution (which will scale the image down) and draw the picture into
- a larger rectangle so that the resulting image will be the correct size.
-
- In TStdPrintHandler I overrode the following methods:
- SetPrintExtent -
- Expand the sizes of the view and print extent so that our drawing
- gets clipped properly and the printer does not print blank pages.
- PosePrintDialog -
- Scale up the drawing to high res printing JUST before the actual
- printing. We cannot rescale the drawing for printing in the Print
- method because the standard print handler wants to update the window
- after putting the job dialog away which is before the drawing for the
- actual printing.
- BanishPrintDialog -
- Return the drawing to screen resolution JUST after the actual
- printing.
- Print -
- Call CheckPrinter in case the user has just changed printers via the
- Chooser. If printer IsVariable then SetResolution high. Do inherited
- Print. Restore using SetResolution back to the screen resolution. Also
- restore the size of the view which got adjusted in SetPrintExtent.
-
- In TStdPrintHandler I added the following methods:
- IsVariable -
- Return TRUE if the current printer has variable resolution (like the
- LaserWriter and return FALSE if it has discrete resolution (like the
- ImageWriter. If there is something better to check please tell me; I
- did not want to do a check like IF device = LaserWriter THEN do high
- resolution.
- SetResolution -
- Set the current printer and print handler to the highest resolution
- supported by the printer or to the screen resolution.
-
- The views that use this print handler need fields representing the horizontal
- and vertical scaling factors which get set by the print handler (via an access
- method of course) and are used in the coordinate transformation routines. Also,
- some access methods were added to the view so we did not have to vandalize the
- view's fSize from inside of the print handler.
-
- The code for this is (in my opinion) surprisingly clean considering what it has
- to do and was not that difficult to write. The hardest part was figuring out
- what to override.
-
- Hope this helps,
-
- Marianne Cain
- Drexel University
- Software Development Group
-
-